[XM] Fix TypeError in exception handler if there is no res_label.
authorAlastair Tse <atse@xensource.com>
Thu, 19 Oct 2006 16:46:08 +0000 (17:46 +0100)
committerAlastair Tse <atse@xensource.com>
Thu, 19 Oct 2006 16:46:08 +0000 (17:46 +0100)
Signed-off-by: Alastair Tse <atse@xensource.com>
tools/python/xen/xm/create.py

index e6e60dc4a61565ae5ac2b56ad86798ef5d914a88..7b43ee79daa5a0604153cf68b009d411ba4bbdd4 100644 (file)
@@ -1146,8 +1146,11 @@ def config_security_check(config, verbose):
         except security.ACMError:
             print "   %s: DENIED" % (resource)
             (res_label, res_policy) = security.get_res_label(resource)
-            print "   --> res:"+res_label+" ("+res_policy+")"
-            print "   --> dom:"+domain_label+" ("+domain_policy+")"
+            print "   --> res: %s (%s)" % (str(res_label),
+                                           str(res_policy))
+            print "   --> dom: %s (%s)" % (str(domain_label),
+                                           str(domain_policy))
+
             answer = 0
 
     return answer